home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / shmem_finc.z / shmem_finc
Encoding:
Text File  |  2002-10-03  |  5.8 KB  |  72 lines

  1.  
  2. SHMEM_FINC(3)                                                 SHMEM_FINC(3)
  3.  
  4.  
  5. NNNNAAAAMMMMEEEE
  6.      sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____ffffiiiinnnncccc, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____ffffiiiinnnncccc, sssshhhhmmmmeeeemmmm____iiiinnnntttt____ffffiiiinnnncccc, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ffffiiiinnnncccc,
  7.      sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____ffffiiiinnnncccc - Performs an atomic fetch-and-increment operation
  8.      on a remote data object
  9.  
  10. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  11.      C or C++:
  12.  
  13.         ####iiiinnnncccclllluuuuddddeeee <<<<mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh>>>>
  14.  
  15.         iiiinnnntttt sssshhhhmmmmeeeemmmm____iiiinnnntttt____ffffiiiinnnncccc((((iiiinnnntttt ****_t_a_r_g_e_t,,,, iiiinnnntttt _p_e))));;;;
  16.  
  17.         lllloooonnnngggg sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ffffiiiinnnncccc((((lllloooonnnngggg ****_t_a_r_g_e_t,,,, iiiinnnntttt _p_e))));;;;
  18.  
  19.         lllloooonnnngggg lllloooonnnngggg sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____ffffiiiinnnncccc((((lllloooonnnngggg lllloooonnnngggg ****_t_a_r_g_e_t,,,, iiiinnnntttt _p_e))));;;;
  20.      Fortran:
  21.  
  22.         IIIINNNNTTTTEEEEGGGGEEEERRRR _p_e
  23.  
  24.         IIIINNNNTTTTEEEEGGGGEEEERRRR((((KKKKIIIINNNNDDDD====4444)))) SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____FFFFIIIINNNNCCCC,,,, ttttaaaarrrrggggeeeetttt4444
  25.  
  26.         IIIINNNNTTTTEEEEGGGGEEEERRRR((((KKKKIIIINNNNDDDD====8888)))) SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____FFFFIIIINNNNCCCC,,,, ttttaaaarrrrggggeeeetttt8888
  27.  
  28.         _i_r_e_s_4 = SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____FFFFIIIINNNNCCCC((((_t_a_r_g_e_t_4,,,, _p_e))))
  29.  
  30.         _i_r_e_s_8 = SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____FFFFIIIINNNNCCCC((((_t_a_r_g_e_t_8,,,, _p_e))))
  31.  
  32. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  33.      These functions perform a fetch-and-increment operation.  The target
  34.      on processing element (PE) _p_e is increased by one and the function
  35.      returns the previous contents of _t_a_r_g_e_t as an atomic operation.
  36.  
  37.      The arguments are as follows:
  38.  
  39.      _t_a_r_g_e_t    The remotely accessible integer data object to be updated on
  40.                the remote PE.  The type of _t_a_r_g_e_t should match that implied
  41.                in the SYNOPSIS section.
  42.  
  43.      _p_e        An integer that indicates the PE number on which _t_a_r_g_e_t is
  44.                to be updated. If you are using Fortran, it must be a
  45.                default integer value.
  46.  
  47. NNNNOOOOTTTTEEEESSSS
  48.      The term _r_e_m_o_t_e_l_y _a_c_c_e_s_s_i_b_l_e is defined in iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3).
  49.  
  50.      The fetch-and-increment routines write directly into another PE's
  51.      memory without notifying that PE, so the receiving PE should normally
  52.      set automatic cache invalidation by use of sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____iiiinnnnvvvv(3) or
  53.      sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____lllliiiinnnneeee____iiiinnnnvvvv(3).  If this is not done, the receiving PE's
  54.      data cache might become incoherent.
  55.  
  56.      You can use the fetch-and-increment routines without setting the
  57.      remote write invalidate bit if you know, prior to the call, that the
  58.      data at the target addresses are not cachable or are otherwise known
  59.      not to reside in the remote processor's cache at the time of the call.
  60.      Alternatively, the receiving processor can flush its cache when it
  61.      knows that it has received data from another processor.  In general,
  62.      this requires synchronization.  To flush the cache, use
  63.      sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh(((()))) or sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh____lllliiiinnnneeee(((()))).
  64.  
  65. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
  66.      The contents that had been at the target address on the remote PE
  67.      prior to the increment.
  68.  
  69. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  70.      iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3), sssshhhhmmmmeeeemmmm____cccclllleeeeaaaarrrr____ccccaaaacccchhhheeee____iiiinnnnvvvv(3), sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____iiiinnnnvvvv(3),
  71.      sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____lllliiiinnnneeee____iiiinnnnvvvv(3)
  72.